<template>
  <div class="area_simulation" @click.stop="closeSelect">
    <div class="area_simulation_content" @click.stop="resetModal">
      <div class="radio_title">请选择区域</div>
      <div id="warp">
        <mt-radio
          align="right"
          v-model="areaValue"
          :options="areaList">
        </mt-radio>
      </div>

      <!--<div>{{areaValue}}</div>-->
    </div>

  </div>
</template>

<script>
  import  Vue from 'vue';
  import { Radio } from 'mint-ui';
  import BScroll from 'better-scroll';
  Vue.component(Radio.name, Radio);
  export default {
    props:{
      closeSelect:{
        type:Function
      },
      areaList:{
        type: Array
      }
    },
    name: 'AreaSimulationTwo',
    data(){
      return{
        // areaValue:'',
        // resetModal:()=>{
        //
        // },
      }
    },
    computed:{
      areaValue:{
        get(){
          return this.$store.getters.getAreaTitle;
        },
        set(val){
          this.$store.commit('setAreaTitle',val);
          this.closeSelect();
        }
      },
    },
    watch:{

    },
    mounted(){
      let that = this;
      that.$nextTick(()=>{
        new BScroll('#warp',{
          click:true
        })
      })

    },
    methods:{
      resetModal(){

      },

    }
  }
</script>

<style scoped>
  .area_simulation{
    width: 100%;
    box-sizing: border-box;
    height: 100vh;
    top: 0;
  }

  .radio_title{
    line-height: 30px;
  }

</style>
